"""
和游戏图片对象相关的模块
"""
import pygame
from image import operations, img_path

# 游戏图片对象
# "开始游戏"界面
start_game_bg: pygame.Surface | None = None
start_game_logo: pygame.Surface | None = None
start_game_btn_bar_dirt: pygame.Surface | None = None
start_game_btn_bar_grass: pygame.Surface | None = None
start_game_btn_bar_grass_roll: pygame.Surface | None = None
# "主菜单"界面
main_menu_bg: pygame.Surface | None = None
main_menu_item_start_adventure: pygame.Surface | None = None
main_menu_item_start_adventure_active: pygame.Surface | None = None
# 游戏地图
map_bg_grass_full: pygame.Surface | None = None


def load_all_img():
    """
    加载游戏中涉及的所有图片资源
    :return:
    """
    global start_game_bg
    global start_game_logo
    global start_game_btn_bar_dirt
    global start_game_btn_bar_grass
    global start_game_btn_bar_grass_roll
    start_game_bg = operations.load_img(img_path.START_GAME_BG_PATH)
    start_game_logo = operations.load_img(img_path.START_GAME_LOGO_PATH)
    start_game_btn_bar_dirt = operations.load_img(img_path.START_GAME_BTN_BAR_DIRT_PATH)
    start_game_btn_bar_grass = operations.load_img(img_path.START_GAME_BTN_BAR_GRASS_PATH)
    start_game_btn_bar_grass_roll = operations.load_img(img_path.START_GAME_BTN_BAR_GRASS_ROLL_PATH)
    global main_menu_bg
    global main_menu_item_start_adventure
    global main_menu_item_start_adventure_active
    main_menu_bg = operations.load_img(img_path.MAIN_MENU_BG_PATH)
    main_menu_item_start_adventure = operations.load_img(img_path.MAIN_MENU_ITEM_START_ADVENTURE_PATH)
    main_menu_item_start_adventure_active = operations.load_img(img_path.MAIN_MENU_ITEM_START_ADVENTURE_ACTIVE_PATH)
    global map_bg_grass_full
    map_bg_grass_full = operations.load_img(img_path.MAP_BG_GRASS_FULL_PATH)
